package com.simtop.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * 用户类
 */
//属性为空或者NULL都不序列化
@Data
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class User {
    /**
     * 主键id
     */
    @ExcelProperty("用户id")
    private Integer id;
    /**
     * 用户名
     */
    @ExcelProperty("用户名")
    private String username;
    /**
     * 登录名
     */
    @ExcelProperty("登录名")
    private String loginName;
    /**
     * 登陆密码
     */
    @ExcelProperty("登录密码")
    private String password;

    /**
     * 角色 复合类型
     */
    @ExcelIgnore
    private Role role;
    /**
     * 角色id
     */
    @ExcelProperty("角色id")
    private Integer roleId;


    private   Date lastTime;

    private String loginIp;

    private int loginCount;

    private int loginTime;

    private int loginStatus;

    @ExcelIgnore
    private String accessToken;

    private  Long millTime;

    private Integer userId;

}
